package com.ruoyi.social.Enum;

public enum ProductStatusEnum {
    start,
    loading,
    execution,

    success,

    error,

    fail;


    public static boolean contains(String status) {
        try {
            valueOf(status);
            return true;
        } catch (IllegalArgumentException e) {
            return false;
        }
    }

    public static ProductStatusEnum getSafe(String status, ProductStatusEnum defaultValue) {
        try {
            return valueOf(status);
        } catch (IllegalArgumentException e) {
            return defaultValue;
        }
    }
}
